package com.weizicheng.config;

import lombok.*;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Arrays;

@Component
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@ToString
@ConfigurationProperties(prefix = "person")
public class PersonProperties {
    private String name;
    private Integer age;
    private String[] dizi;

   /* public PersonProperties() {
    }

    public PersonProperties(String name, Integer age, String[] dizi) {
        this.name = name;
        this.age = age;
        this.dizi = dizi;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String[] getDizi() {
        return dizi;
    }

    public void setDizi(String[] dizi) {
        this.dizi = dizi;
    }

    @Override
    public String toString() {
        return "PersonProperties{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", dizi=" + Arrays.toString(dizi) +
                '}';
    }*/
}
